#ifndef __UART_H
#define __UART_H

#include <stdint.h>
#include "common.h"
#include "fmux.h"

#define UART_RECV_BUFFER_SIZE	128
#define UART_SEND_BUFFER_SIZE	256
#define CMD_RECV_BUFFER_SIZE	256


void uart_enable(void);
void uart_disable(void);
uint8_t uart_send(const uint8_t *, uint16_t);
uint16_t uart_receive(uint8_t *, uint16_t);

void process_receive(void);

/**
 * Buffer to hold a complete command
 */
union cmd_line_t {
	uint8_t cmd_raw[CMD_RECV_BUFFER_SIZE];
	struct comm_unit cmd;
}; 

#endif
